using System.Collections.Generic;
using UnityEngine;
#region Tags
/// <summary>
/// Tags
/// </summary>
public enum en_ESF_Tags
{
	/// <summary>
	/// Untagged
	/// </summary>
	[ESF_AliasTooltip("Untagged")]
	Untagged,
	/// <summary>
	/// Respawn
	/// </summary>
	[ESF_AliasTooltip("Respawn")]
	Respawn,
	/// <summary>
	/// Finish
	/// </summary>
	[ESF_AliasTooltip("Finish")]
	Finish,
	/// <summary>
	/// EditorOnly
	/// </summary>
	[ESF_AliasTooltip("EditorOnly")]
	EditorOnly,
	/// <summary>
	/// MainCamera
	/// </summary>
	[ESF_AliasTooltip("MainCamera")]
	MainCamera,
	/// <summary>
	/// Player
	/// </summary>
	[ESF_AliasTooltip("Player")]
	Player,
	/// <summary>
	/// GameController
	/// </summary>
	[ESF_AliasTooltip("GameController")]
	GameController,
	    
}
#endregion
#region SortingLayers
/// <summary>
/// UI画布SortingLayer
/// </summary>
public enum en_ESF_SortingLayer
{
	/// <summary>
	/// Default
	/// </summary>
	[ESF_AliasTooltip("Default")]
	Default,
}
#endregion
#region Layers
/// <summary>
/// Layers
/// </summary>
public enum en_ESF_Layers
{
	/// <summary>
	/// Default
	/// </summary>
	[ESF_AliasTooltip("Default")]
	Default,
	/// <summary>
	/// TransparentFX
	/// </summary>
	[ESF_AliasTooltip("TransparentFX")]
	TransparentFX,
	/// <summary>
	/// Ignore_Raycast
	/// </summary>
	[ESF_AliasTooltip("Ignore Raycast")]
	Ignore_Raycast,
	/// <summary>
	/// Water
	/// </summary>
	[ESF_AliasTooltip("Water")]
	Water,
	/// <summary>
	/// UI
	/// </summary>
	[ESF_AliasTooltip("UI")]
	UI,
}
#endregion
/// <summary>
/// 全局工具
/// </summary>
public static partial class ESF_GlobalUtility
{
    /// <summary>
    /// SortingLayer映射
    /// Key:en_ESF_SortingLayer
    /// Value:SortingLayer的值
    /// </summary>
    static Dictionary<en_ESF_SortingLayer, int> mSortingLayerMaping =
        typeof(en_ESF_SortingLayer).ESF_EnumToSpecialValue<en_ESF_SortingLayer, ESF_AliasTooltipAttribute, int>((v, att) => { return SortingLayer.GetLayerValueFromName(att.alias); });
    /// <summary>
    /// en_ESF_Tags映射
    /// Key:en_ESF_Tags
    /// Value:Tag字符
    /// </summary>
    static Dictionary<en_ESF_Tags, string> mTagsMaping =
        typeof(en_ESF_Tags).ESF_EnumToSpecialValue<en_ESF_Tags, ESF_AliasTooltipAttribute, string>((v, att) => { return att.alias; });
    /// <summary>
    /// SortingLayer映射
    /// Key:en_ESF_Layers
    /// Value:Layer的值
    /// </summary>
    static Dictionary<en_ESF_Layers, int> mLayersMaping =
        typeof(en_ESF_Layers).ESF_EnumToSpecialValue<en_ESF_Layers, ESF_AliasTooltipAttribute, int>((v, att) => { return LayerMask.NameToLayer(att.alias); });
	/// <summary>
    /// 获得指定的SortingLayer值
    /// </summary>
    /// <param name="_sortingLayer">SortingLayer</param>
    /// <returns>值</returns>
    public static int GetSortingLayer(en_ESF_SortingLayer _sortingLayer)
    {
        return mSortingLayerMaping[_sortingLayer];
    }
    /// <summary>
    /// 获得指定的Tag值
    /// </summary>
    /// <param name="_tag">Tag</param>
    /// <returns>值</returns>
    public static string GetTag(en_ESF_Tags _tag)
    {
        return mTagsMaping[_tag];
    }
    /// <summary>
    /// 获得指定的Layer值
    /// </summary>
    /// <param name="_layer">Layer</param>
    /// <returns>值</returns>
    public static int GetLayer(en_ESF_Layers _layer)
    {
        return mLayersMaping[_layer];
    }
}